package org.apache.hive.hcatalog.templeton;

import org.apache.hadoop.hdfs.web.AuthFilter;

import javax.servlet.*;
import java.io.IOException;

public class AuthFilterAdapter implements Filter {
    private AuthFilter authFilter;
    @Override
    public void init(FilterConfig filterConfig) throws ServletException {
        Filter.super.init(filterConfig);
        this.authFilter = new AuthFilter();
    }

    @Override
    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
        authFilter.doFilter( servletRequest,  servletResponse,  filterChain);
    }

    @Override
    public void destroy() {
        Filter.super.destroy();
    }
}
